<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title></title>
<link rel="stylesheet" href="__PUBLIC__/css/pintuer.css">
<link rel="stylesheet" href="__PUBLIC__/css/admin.css">
<script src="__PUBLIC__/js/jquery.js"></script>
<script src="__PUBLIC__/js/pintuer.js"></script>

<!-- 图片点击放大 -->
<link rel="stylesheet" href="__PUBLIC__/dist/zoomify.min.css">
<link rel="stylesheet" href="__PUBLIC__/css/style.css">

<!-- 图片点击放大end -->

</head>
<body>
<div class="panel admin-panel">
<form method="post" class="form-x" action="__URL__/sousuo1">
  <div class="form-group">
    <div class="label">
      <label>商家手机号：</label>
    </div>
    <div class="field">
      <input type="text" class="input" name="phone" value="" style="width:25%; float:left;" value="" data-toggle="hover" data-place="right" data-image=""  />
      <input type="submit" class="button bg-blue margin-left" value="搜索">
    </div>
  </div>
  </div>
</form>
  <div class="panel-head"><strong class="icon-reorder">已通过商家列表</strong></div>
  <div class="padding border-bottom">
  </div>
  <table class="table table-hover text-center">
    <tr>
        <th>商家名称</th>
        <th>商家id</th>
        <th>联系人</th>
        <th>注册电话</th>
		<th>上级</th>
        <th>所在地区</th>
        <th>详细地址</th>
        <th>店铺类型</th>
        <th>店铺简介</th>
        <th>店铺图片1</th>
        <th>店铺图片2</th>
        <th>操作</th>
      </tr>
      <volist name="list" id="vo" key="k">
        <tr>
            <td>
                {$vo.name}
            </td>
            <td>
                {$vo.shop_id}
            </td>
            <td>{$vo.contacts}
            </td>
            <td>
                <font color="#00CC99">{$vo.phone}</font>
            </td>
			<td>
				<?php
					
					if(!$vo['pid']){
						echo '无';
					}elseif($vo['is_user']){						
						$mysql_server_name='127.0.0.1'; //改成自己的mysql数据库服务器
						 
						$mysql_username='root'; //改成自己的mysql数据库用户名
						 
						$mysql_password='root'; //改成自己的mysql数据库密码
						 
						$mysql_database='cdzx'; //改成自己的mysql数据库名

						$conn=mysql_connect($mysql_server_name,$mysql_username,$mysql_password) or die("数据库链接错误") ; //连接数据库
						 
						mysql_query("set names 'utf8'"); //数据库输出编码 
						 
						mysql_select_db($mysql_database); //打开数据库
						$sql ="select * from user where user_Id = ".$vo['pid']; //SQL语句
						$result = mysql_query($sql,$conn); //查询
						$row = mysql_fetch_array($result);
						echo $row['name'];
					}else{
						$mysql_server_name='127.0.0.1'; //改成自己的mysql数据库服务器
						 
						$mysql_username='root'; //改成自己的mysql数据库用户名
						 
						$mysql_password='root'; //改成自己的mysql数据库密码
						 
						$mysql_database='cdzx'; //改成自己的mysql数据库名

						$conn=mysql_connect($mysql_server_name,$mysql_username,$mysql_password) or die("数据库链接错误") ; //连接数据库
						 
						mysql_query("set names 'utf8'"); //数据库输出编码 
						 
						mysql_select_db($mysql_database); //打开数据库
						$sql1 ="select * from shop where shop_id = ".$vo['pid']; //SQL语句
						$result1 = mysql_query($sql1,$conn); //查询
						$row1 = mysql_fetch_array($result1);
						echo $row1['contacts'];
					}  
				?>
            </td>
            <td>{$vo.area}</td>
            <td>{$vo.address}</td>
            <td>{$vo.type}</td>
            <td>{$vo.synopsis}</td>
            <td><p class="example"><img src="__PUBLIC__/Uploads/{$vo.photo1}" alt="" width="70" height="50" /></p></td>
            <td><p class="example"><img src="__PUBLIC__/Uploads/{$vo.photo2}" alt="" width="70" height="50" /></p></td>
            <td>
              <div class="button-group"> 
                  <a class="button border-main" href="__URL__/more/id/{$vo.shop_id}"><span class="icon-edit"></span>详情</a>
                  <a class="button border-yellow" href="__URL__/set/id/{$vo.shop_id}"><span class="icon-edit"></span>修改</a>  
                  <a class="button border-red" href="__URL__/del/id/{$vo.shop_id}"><span class="icon-edit"></span> 删除</a> 
              </div>
              </td>
          </tr>
  </volist>
         
      <tr>
        <td colspan="8"><div class="pagelist"> {$page} </div></td>
      </tr>
    
  </table>
</div>


</body>

<script src="__PUBLIC__/js/jquery-2.1.1.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/dist/zoomify.min.js"></script>
<script type="text/javascript">
  $('.example img').zoomify();
</script>
</html>